package com.ubb.damate.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the file database table.
 * 
 */
@Entity
@Table(name="file")
public class File implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private FilePK id;

    @Temporal( TemporalType.DATE)
	@Column(name="CreationDate", nullable=false)
	private Date creationDate;

	//bi-directional many-to-one association to Project
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="ProjectName", referencedColumnName="ProjectName", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="WorkspaceId", referencedColumnName="WorkspaceId", nullable=false, insertable=false, updatable=false)
		})
	private Project project;

    public File() {
    }

	public FilePK getId() {
		return this.id;
	}

	public void setId(FilePK id) {
		this.id = id;
	}
	
	public Date getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public Project getProject() {
		return this.project;
	}

	public void setProject(Project project) {
		this.project = project;
	}
	
}